// Modbus
var PageModbus2 = {
    id: "PageModbus2", //页面id
    menu: "i18n.lan.menu.modbus", //所属菜单(一级菜单名)
    title: "i18n.lan.menu.PageModbus2", //标题（二级菜单名）
    parentIcon: "icon-me-register", //图标
    icon: "icon-me-register", //图标
    refreshBtnCmd: "MODBUS_DUMPS", //刷新按钮指令
    saveBtn: true, //保存按钮
    el: [ //控件
        {
            elname: "datagrid",
            rowCount: Device.getNodesCount("reg"), //必选,行数
            data: {
                height: "400px",
                width: 1220,
                // onEndEdit: PageModbus_onEndEdit,
                frozenColumns: [//固定列
                    [ //表格列,field为列标题
                        {//序号
                            field: "index",
                            title: i18n.lan.common.index,
                            width: 40,
                            align: "center",
                        },
                    ]
                ],
                columns: [
                    [ //表格列,field为列标题

                        {//报警低值
                            field: "alarmLowVal",
                            editor: Easyui.editor.numberbox4,
                            dumpKey: "MREG<n>NODE_RANGE1",
                            dumpParamIndex: 1,
                            cmdKey: "MODBUSREG<n>LOW",
                            width: 70,
                        },
                        {//报警高值
                            field: "alarmHighVal",
                            editor: Easyui.editor.numberbox4,
                            dumpKey: "MREG<n>NODE_RANGE1",
                            dumpParamIndex: 0,
                            cmdKey: "MODBUSREG<n>HIGH",
                            width: 70,
                        },
                        {//物理低值
                            field: "rangeLowVal",
                            editor: Easyui.editor.numberbox4,
                            dumpKey: "MREG<n>NODE_RANGE2",
                            dumpParamIndex: 1,
                            cmdKey: "MODBUSREG<n>RANGELOW",
                            width: 70,
                        },
                        {//物理高值
                            field: "rangeHighVal",
                            editor: Easyui.editor.numberbox2,
                            dumpKey: "MREG<n>NODE_RANGE2",
                            dumpParamIndex: 0,
                            cmdKey: "MODBUSREG<n>RANGEHIGH",
                            width: 60,
                        },
                        {//步长值
                            field: "stepValue",
                            editor: Easyui.editor.numberbox4,
                            dumpKey: "MREG<n>NODE_RANGE2",
                            dumpParamIndex: 3,
                            cmdKey: "MODBUSREG<n>STEP",
                            width: 70,
                        },
                        {//再次报警步长
                            field: "alarmStep",
                            editor: Easyui.editor.numberbox4,
                            dumpKey: "MREG<n>NODE_RANGE2",
                            dumpParamIndex: 5,
                            cmdKey: "MODBUSREG<n>ALARMSTEP",
                            width: 100,
                        },
                        //无效
                        // {//低通值
                        //     field: "filterLow",
                        //     editor: Easyui.editor.numberbox2,
                        //     dumpKey: "MREG<n>NODE_RANGE2",
                        //     dumpParamIndex: 4,
                        //     cmdKey: "MODBUSREG<n>FILTERLOW",
                        //     width: 60,
                        // },
                        {//确认时间
                            field: "ensureTime",
                            editor: Easyui.editor.numberbox,
                            dumpKey: "MREG<n>NODE_AETO",
                            cmdKey: "MODBUSREG<n>AETO",
                        },
                        {//报警短信重发周期时间
                            field: "alarmSmsResendTime",
                            editor: Easyui.editor.numberbox,
                            dumpKey: "MREG<n>NODE_SMSTO",
                            dumpParamIndex: 1,
                            cmdKey: "MODBUSREG<n>ASRTO",
                        },
                        {//暂停报警时长（最短间隔）
                            field: "stopAlarmTime",
                            editor: Easyui.editor.numberbox,
                            dumpKey: "MREG<n>NODE_SMSTO",
                            dumpParamIndex: 0,
                            cmdKey: "MODBUSREG<n>ASSTO",
                        },
                        {//上传定时器
                            field: "uploadTimer",
                            editor: Easyui.editor.numberbox,
                            dumpKey: "MREG<n>NODE_IOTTO",
                            dumpParamIndex: 0,
                            cmdKey: "MODBUSREG<n>IOTTO",
                        },
                        {//短信报警
                            field: "smsAlarm",
                            formatter: Easyui.formatter.checkbox,
                            editor: Easyui.editor.checkbox,
                            dumpKey: "MREG<n>NODE_PARAM",
                            dumpParamIndex: 0,
                            cmdKey: "MODBUSREG<n>SMSEN",
                            align: "center",
                        },
                        {//恢复短信
                            field: "recoverSms",
                            formatter: Easyui.formatter.checkbox,
                            editor: Easyui.editor.checkbox,
                            dumpKey: "MREG<n>NODE_PARAM",
                            dumpParamIndex: 2,
                            cmdKey: "MODBUSREG<n>SMSREN",
                            width: 70,
                            align: "center",
                        },
                        {//断开短信
                            field: "disconnSms",
                            formatter: Easyui.formatter.checkbox,
                            editor: Easyui.editor.checkbox,
                            dumpKey: "MREG<n>NODE_PARAM",
                            dumpParamIndex: 3,
                            cmdKey: "MODBUSREG<n>SMSDISCONNEN",
                            width: 70,
                            align: "center",
                        },
                        {//声音报警
                            field: "soundAlarm",
                            formatter: Easyui.formatter.checkbox,
                            editor: Easyui.editor.checkbox,
                            dumpKey: "MREG<n>NODE_PARAM",
                            dumpParamIndex: 1,
                            cmdKey: "MODBUSREG<n>SOUNDEN",
                            align: "center",
                        },
                    ]
                ],
            }
        },
    ],
}
CmdPage.add(PageModbus2); //添加到页面管理
